package io.github.talelin.latticy.controller.v1;

import io.github.talelin.latticy.model.AdvDO;
import io.github.talelin.latticy.service.AdvService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 作者:可
 * 时间:2021/7/14 11:25
 * 描述:永无BUG
 */
@RestController
@RequestMapping("/v1/adv")
public class AdvController {

    @Autowired
    private AdvService advService;

    @GetMapping("/all")
    public List<AdvDO> getAdv(){
        List<AdvDO> advs = advService.getAdv();
        return advs;
    }
}
